package com.lantosec.hmrp.modules.sysdata.entity;

import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.sysdata.vo.SysProcessNotifyVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.util.Date;

/**
 * <p>
 * 流程知会表 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-06-21
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysProcessNotify extends BaseEntity<SysProcessNotifyVO> {

    private static final long serialVersionUID = 1L;
    public SysProcessNotify(SysProcessNotifyVO vo){
        this.id = vo.getId();
        this.proInsId = vo.getProInsId();
        this.taskId = vo.getTaskId();
        this.formLayoutId = vo.getFormLayoutId();
        this.startUserId = vo.getStartUserId();
        this.notifyUserId = vo.getNotifyUserId();
        this.createTime = vo.getCreateTime();
        this.notifyStatus = vo.getNotifyStatus();
    }
    @Override
    public SysProcessNotifyVO convertToVO(){
        return new SysProcessNotifyVO(this);
    }

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    /**
     * Flowable中对应的流程实例ID
     */
    private String proInsId;

    /**
     * Flowable中对应的流程任务ID
     */
    private String taskId;

    /**
     * 流程的表单布局ID
     */
    private String formLayoutId;

    /**
     * 知会发起人Id
     */
    private String startUserId;

    /**
     * 知会用户Id
     */
    private String notifyUserId;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 知会状态 已读：READED 未读 UNREAD
     */
    private String notifyStatus;


    public enum ColName {
        id, pro_ins_id, task_id, form_layout_id, start_user_id, notify_user_id, create_time, notify_status
    }
}
